How to achieve zero-downtime deployment(blue/green) when there is a database change?Micro-services interview questions for experienced/Microservice Interview Questions and Answers for Freshers & Experienced

How to achieve zero-downtime deployment(blue/green) when there is a database change?

The deployment scenario becomes complex when there are database changes during the upgrade. There can be two different scenarios: 1. database change is backward compatible (e.g. adding a new table column) 2. database change is not compatible with an older version of the application (e.g. renaming an existing table column)

* Backward compatible change: This scenario is easy to implement and can be fully automated using Flyway. We can add the script to create a new column and the script will be executed at the time of deployment. Now during blue/green deployment, two versions of the application (say v1 and v2) will be connected to the same database. We need to make sure that the newly added columns allow null values (btw that’s part of the backward compatible change). If everything goes well, then we can switch off the older version v1, else application v2 can be taken off.

* Non-compatible database change: This is a tricky scenario, and may require manual intervention in-case of rollback. Let's say we want to rename first_name column to fname in the database. Instead of directly renaming, we can create a new column fname and copy all existing values of first_name into fname column, keeping the first_name column as it is in the database. We can defer non-null checks on fname to post-deployment success. If the deployment goes successful, we need to migrate data written to first_name by v1 to the new column (fname) manually after bringing down the v1. If the deployment fails for v2, then we need to do the otherwise.
Complexity may be much more in a realistic production app, such discussions are beyond the scope of this book.

Posted Date:- 2021-09-24 05:41:56

Why do Microservices require a DevOps approach??

What is a bounded context in microservices?

What is the Service Discovery pattern in microservices?

What is a Log aggregator pattern in Microservices?

What tools can be used for monitoring microservices?

How to secure microservices?

What is feign client in microservices?

What are the most common mistakes while transitioning to Microservices?

Which acts as a database of services in microservices?

How are the problems with distributed transactions addressed in microservices?

What is a circuit breaker pattern in Microservices?

What is the CQRS pattern in microservice??

What is a saga pattern in microservices?

Efficient utilization & fast deployment represent which pattern in microservices?

What is Tasklet, and what is a Chunk? ↑

What is blue/green deployment?

What is load balancing in Spring Cloud?

What factors make one hesitant to use microservices?

List some of the best practices to design Microservices.

Briefly tell about serverless deployment strategy of Microservices deployment.

What are the three types of tests for Microservices?

What is a ‘dumb pipe’ in Microservices?

How to implement microservices in java?

How to deploy microservices?

Why are containers a good infrastructure for microservices?

What is Spring Cloud Gateway? What are its advantages over Netflix Zuul

How to achieve server side load balancing using Spring Cloud

What does one mean by Load Balancing ? How is it implemented in Spring Cloud

Give one/a few examples of microservices implementation.

Where is the WebMVC Test Annotation used?

What are the most common mistakes while transitioning to Microservices?

How do you create State Machines out of Microservices?

How to achieve zero-downtime deployment(blue/green) when there is a database change?

Can we create State Machines out of Microservices?

What is Continuous Monitoring?

What do you mean by Continuous Integration (CI)?

How will you deploy Exception Handling in Microservices?

What is Tasklet, and what is a Chunk?

What is Spring Batch Framework?

When will you see fit to use the Netflix Hystrix?

How will you balance the server-side load by utilizing Spring Cloud?

What are Reactive Extensions in Microservices?

What are the different types of credentials of a two-factor Authentication?

What is Canary Releasing?

What is the difference between Mock & Stub?

What can you derive/understand from Conway’s Law?

How will you Configure Spring Boot Application Login?

How can we eradicate non-determinism in tests?

What is DRY in Microservices architecture?


What are Cloud-Native applications?

Search
R4R Team
R4R provides Microservice Freshers questions and answers (Microservice Interview Questions and Answers) .The questions on R4R.in website is done by expert team! Mock Tests and Practice Papers for prepare yourself.. Mock Tests, Practice Papers,Micro-services interview questions for experienced,Microservice Freshers & Experienced Interview Questions and Answers,Microservice Objetive choice questions and answers,Microservice Multiple choice questions and answers,Microservice objective, Microservice questions , Microservice answers,Microservice MCQs questions and answers Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++, HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher R4r provides Python,General knowledge(GK),Computer,PHP,SQL,Java,JSP,Android,CSS,Hibernate,Servlets,Spring etc Interview tips for Freshers and Experienced for Microservice fresher interview questions ,Microservice Experienced interview questions,Microservice fresher interview questions and answers ,Microservice Experienced interview questions and answers,tricky Microservice queries for interview pdf,complex Microservice for practice with answers,Microservice for practice with answers You can search job and get offer latters by studing r4r.in .learn in easy ways .